package com.example.lol.ui.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.example.lol.R;
import com.example.lol.ui.bean.NewBean;

import org.jetbrains.annotations.NotNull;


public class NewsAdapter extends BaseQuickAdapter<NewBean, BaseViewHolder> {
    public NewsAdapter() {
        super(R.layout.item_1);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, NewBean newsBean) {
        baseViewHolder.setText(R.id.tv_news_title, newsBean.getTitle());
        baseViewHolder.setText(R.id.tv_hot, newsBean.getHot());
        baseViewHolder.setImageResource(R.id.img_cover, newsBean.getDrawable());
        baseViewHolder.setImageResource(R.id.tv_lol,newsBean.getLol());
        baseViewHolder.setImageResource(R.id.tv_icon,newsBean.getIcon());
        baseViewHolder.setText(R.id.tv_number,newsBean.getNumber());

    }
}
